import http from '../../utils/request/request'

export function getShopSupplyByPage(size=3, page =1){
    return http({
        url:`/breed/merchant/supply/${size}/${page}`,
        method:'get'
    })
}

export function addShopSupply(data){
    return http({
        url:"/breed/merchant/supply",
        method:'post',
        data
    })
}

export function deleteShopSupply(id){
    return http({
        url:`/breed/merchant/supply/${id}`,
        method:'delete'
    })
}

export function deleteShopSupplyBatch(ids){
    return http({
        url:'/breed/merchant/supply/batch',
        method:'delete',
        data:ids
    })
}

export function editSupply(data){
    return http({
        url:`/breed/merchant/supply`,
        method:"put",
        data
    })
}

export function getOneSupplyInfo(id){
    return http({
        url:`/breed/merchant/supply/one/${id}`,
        method:"get"
    })
}

export function changeStatus(id,val){
    return http({
        url:`/breed/merchant/supply/status/${id}/${val}`,
        method:'put'
    })
}